package progarbre;

import exprarbre.ASAIdent;
import java.util.ArrayList;
import vue.InterpreteurView;

public class ASARead extends ASAFonction {

    private InterpreteurView view;

    public ASARead(InterpreteurView view) {
        super("READ", new ArrayList<ASAIdent>());
        this.view = view;
    }

    @Override
    public void interpreter() {
        try {

            ASAProg.set(ASAProg.getBottom(), (Integer) view.demanderValeur());
        }
        catch (Exception ex) {
            throw new RuntimeException("Valeur non entiere");
        }
    }
}